# -*- coding: utf-8 -*-
# @Time : 2023/11/25 11:58
# @Author : 王薪超
# @Email : 1517113428@qq.com
# @File : page_wxc_del.py
# @Project : dev-master

from common.base_page import BasePage
from appium.webdriver.common.appiumby import AppiumBy
from time import sleep
class Delete(BasePage):
    rl_left = (AppiumBy.ID,'com.jhss.youguu:id/rl_left')#点击头像
    btn_self_stock = (AppiumBy.ID,'com.jhss.youguu:id/btn_self_stock')#点击自选
    delq =  (AppiumBy.ID,'com.jhss.youguu:id/tv_self_stock_num')#删除前
    tv_manage = (AppiumBy.ID,'com.jhss.youguu:id/tv_manage')#管理
    container = (AppiumBy.ID,'com.jhss.youguu:id/container')#选择股票
    btn_right_text = (AppiumBy.ID,'com.jhss.youguu:id/btn_right_text')#删除按钮
    btn_common_confirm = (AppiumBy.ID,'com.jhss.youguu:id/btn_common_confirm')#确定删除
    back = (AppiumBy.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.ImageButton')
    delh =  (AppiumBy.ID,'com.jhss.youguu:id/tv_self_stock_num')#删除后
    def del_page(self):
        self.click_ele(self.btn_self_stock)#点击自选
        sleep(1)
        self.click_ele(self.tv_manage)#点击管理
        sleep(1)
        self.click_ele(self.container)#点击股票
        sleep(1)
        self.click_ele(self.btn_right_text)#点击删除
        sleep(1)
        self.click_ele(self.btn_common_confirm)#确定删除
        sleep(1)
        self.click_ele(self.back)#返回
        sleep(1)
        self.click_ele(self.rl_left)#头像
        sleep(1)